﻿using MusicLibrary.Web.DbAdapters;
using MusicLibrary.Web.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace MusicLibrary.Web.Controllers
{

    public class TagController : ApiController
    {

        IMusicLibraryAdapter _adapter;

        
        public TagController()
        {
            _adapter = new MusicLibraryAdapter();
        }
        public TagController(IMusicLibraryAdapter adapter)
        {
            _adapter = adapter;
        }

        // /api/tag/album
        public IHttpActionResult Post(string what, int id, [FromBody] NewTagVm tagVm)
        {
            AlbumListVm vm = _adapter.AddTagToAlbum(id, tagVm.Tag);
            return Ok();
        }
    }
}
